using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;

namespace LenninSoftware.FormEditor.Adapters
{
    class Unknown : BaseControlAdapter
    {

        public override Control CreateReadOnlyControl(FieldInfo field)
        {
            Label unknownTypeLabel = new Label();
            unknownTypeLabel.Text = "Control for type " + field.TypeAsString;
            return unknownTypeLabel;
        }

        public override void LoadReadOnlyData(Control control, SPListItem item, object data)
        {

        }

        public override System.Web.UI.Control CreateControl(FieldInfo field)
        {
            Label unknownTypeLabel = new Label();
            unknownTypeLabel.Text = "Control for type " + field.TypeAsString;
            return unknownTypeLabel;
        }

        public override void LoadData(System.Web.UI.Control control, SPListItem item, object data)
        {
  
        }

        public override object SaveData(System.Web.UI.Control control, SPListItem item, object currentData)
        {
            return currentData;
        }

        public override void Reset(System.Web.UI.Control control)
        {

        }

        public override bool isEmpty(Control control)
        {
            return false;
        }
    }
}
